Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 8 Forum

Notes/Domino 8 Forum

Previous Next
Subject: "The byte array is not a recognized imageformat" in application.
Feedback Type: Problem
Product Area: Notes 8 Client
Technical Area: Functionality
Platform: Windows Vista client
Release: 8.0.1
Reproducible: Always

Hi,

NOTE: I have posted this on the iText maillist, but think it's more a Notes issue due to what I state in line 2 and 3..

We are using Lotus Notes version 8 along with iText version 2.1.0 (Was using 2.0.8 and was having same issue so upgraded to 2.1.0 to see if that fixed the problem).

On machines that run Lotus Notes Client and Designer, the code listed below works perfectly 100%.. Both attempts below work...

But, on machines that only run Lotus Notes Client, we get "The byte array is not a recognized imageformat". I am very confused as to why and cannot find any reason for it.

Notes: The ImageResourceExtractor is compile along with the program and is based on code from Mikkel Heisterberg.

PdfPTable inTable0101 = new PdfPTable(1);
ImageResourceExtractor ire = new ImageResourceExtractor(session, db, "RBGlogo.jpg");
byte[] imgbytes = ire.getImageBytes();
cell = new PdfPCell(Image.getInstance(imgbytes));
cell.setBorder(Rectangle.NO_BORDER);

I even tried it like this and I get the same problem.. It's always at the getInstance line...

PdfPTable inTable0101 = new PdfPTable(1);
ImageResourceExtractor ire = new ImageResourceExtractor(session, db, "RBGlogo.jpg");
byte[] imgbytes = ire.getImageBytes();
Image img1 = Image.getInstance(imgbytes);
cell = new PdfPCell(img1);
cell.setBorder(Rectangle.NO_BORDER);

Does anyone have a possible explanation that might resolve my issue.

Thanks in advance...


Feedback number WEBB7E2Q7B created by ~Chris Dwoniterynds on 04/25/2008






Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS